<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
       $file=fopen("1.html","r+") or exit("文件不存在");
   
       if($file){
           echo "<br/>文件可以被打开<br/>";
           //feof 判断是否读取到文件的结尾
           while(!feof($file))
            {
                echo fgets($file). "<br>";
            }
       }else{
           echo "<br/>文件不存在！";
       }   
       fwrite($file, "新增的内容\n");
       rmdir("0430001");
       
       mkdir("0430002","0777");
       fclose(fopen("0430002/abc.txt","w+"));
       if(unlink("0430002/abc.txt")){
           echo "<br/>删除文件成功！<br/>";
       }
       fclose($file);
        ?>
    </body>
</html>
